package com.aspose.cells;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;

class zaiz {
   private zcfw c = null;
   private HashMap d = null;
   private boolean e = false;
   private ArrayList f;
   private int g;
   private zpa h = null;
   private Chart i = null;
   private com.aspose.cells.a.f.zi j = null;
   private Workbook k = null;
   private ArrayList l = new ArrayList();
   ArrayList a = new ArrayList();
   ShapeCollection b = null;
   private boolean m;
   private boolean n;
   private static final com.aspose.cells.b.c.a.za o = new com.aspose.cells.b.c.a.za(new String[]{"vert", "eaVert", "vert270", "wordArtVertRtl", "wordArtVert", "http://schemas.openxmlformats.org/officeDocument/2006/relationships/themeOverride", "l", "b", "r", "t", "grpSpPr", "cxnSp", "graphicFrame", "grpSp", "pic", "sp", "spPr", "txBody", "style", "txXfrm", "absoluteAnchor", "oneCellAnchor", "freeFloating", "relSizeAnchor", "twoCellAnchor", "absSizeAnchor", "from", "to", "ext", "pos", "nvPicPr", "nvGrpSpPr", "nvGraphicFramePr", "nvSpPr", "nvCxnSpPr", "blipFill", "xfrm", "graphic", "prstGeom", "custGeom", "clientData", "cNvPr", "cNvSpPr", "cNvCxnSpPr", "cNvGrpSpPr", "cNvPicPr", "cNvGraphicFramePr", "cameraTool", "compatExt", "cellRange", "spid", "embed", "link", "chart", "slicer", "timeslicer", "relIds", "off", "chOff", "chExt", "flipV", "flipH", "rot", "fPublished", "macro", "textlink", "fLocksText", "id", "descr", "name", "title", "hidden", "hlinkClick", "hlinkHover", "cxnSpLocks", "graphicFrameLocks", "grpSpLocks", "picLocks", "spLocks", "stCxn", "endCxn", "extLst", "noAdjustHandles", "noChangeArrowheads", "noChangeAspect", "noChangeShapeType", "noEditPoints", "noGrp", "noMove", "noResize", "noRot", "noSelect", "noTextEdit", "noCrop", "idx", "fPrintsWithSheet", "fLocksWithSheet", "tooltip"});

   zaiz(zpa var1, HashMap var2, com.aspose.cells.a.f.zi var3, String var4) throws Exception {
      this.d = var2;
      this.e = false;
      this.h = var1;
      this.b = this.h.d.getShapes();
      this.j = var3;
      this.k = var1.d.getWorkbook();
      this.g = this.k.getWorksheets().L();
      this.f = new ArrayList();
      this.c = zasr.a(this.j, var4, true);
   }

   zaiz(zpa var1, Chart var2, HashMap var3, com.aspose.cells.a.f.zi var4, String var5) throws Exception {
      this.h = var1;
      this.d = var3;
      this.e = true;
      this.i = var2;
      this.b = this.i.getShapes();
      this.j = var4;
      this.k = var2.j().n();
      this.g = this.k.getWorksheets().L();
      this.f = new ArrayList();
      this.c = zasr.a(this.j, var5, true);
   }

   void a() throws Exception {
      int var1 = 0;
      this.c.j();
      if (!this.c.d()) {
         this.c.c();
      } else {
         zrs var2 = new zrs();

         while(this.c.r() != 4) {
            if (this.c.r() != 1) {
               this.c.a();
            } else {
               zcfq var3 = this.c.a((zcft)var2, false);
               if (var3 instanceof zcfl) {
                  this.a((zcfl)var3, var1, false);
               }

               ++var1;
            }
         }

         this.c.h();
         this.c.c();
         this.c();
      }
   }

   private void a(zox var1, String var2) throws Exception {
      OleObject var3 = var1.m;
      Object var4 = null;
      String var5 = null;
      if (var2 != null) {
         var5 = "xl" + var2.substring(2);
         com.aspose.cells.a.f.zh var6 = this.j.a(var5);
         com.aspose.cells.b.a.d.zm var7 = this.j.a(var6);
         byte[] var10 = new byte[(int)var6.a()];
         var7.a(var10, 0, (int)var6.a());
         var7.a();
         int var8 = this.k.getWorksheets().Q().a(var10);
         var3.a(var8);
      }

      if (var1.c != null) {
         String var11 = var1.c;
         var11 = "xl" + var11.substring(2);
         com.aspose.cells.a.f.zh var12 = this.j.a(var11);
         com.aspose.cells.b.a.d.zm var13 = this.j.a(var12);
         byte[] var9 = new byte[(int)var12.a()];
         var13.a(var9, 0, (int)var12.a());
         var13.a();
         var3.a(var9);
         if (!var3.k()) {
            var3.b(com.aspose.cells.b.a.d.zk.b(var11));
         }

         com.aspose.cells.b.a.a.ze.a(this.k.b.g, (Object)com.aspose.cells.b.a.d.zk.b(var11));
      }

      if (var1.g != null) {
         var3.c(var1.g);
         if ("OLEUPDATE_ALWAYS".equals(var1.h)) {
            var3.c(true);
         } else if ("OLEUPDATE_ONCALL".equals(var1.h)) {
            var3.c(false);
         }
      } else {
         var3.c(var1.k);
         var3.setLink(var1.j);
         if (var1.l != null) {
            var3.b(var1.l);
         }
      }

      if (var1.f != null) {
         var3.setProgID(var1.f);
      }

      if ("DVASPECT_ICON".equals(var1.i)) {
         var3.setDisplayAsIcon(true);
      }

      if (var1.c != null) {
         com.aspose.cells.b.a.a.ze.a(this.k.b.h, (Object)com.aspose.cells.b.a.d.zk.b(var1.c));
      }

   }

   private void c() throws Exception {
      for(int var1 = 0; var1 < this.l.size(); var1 += 2) {
         Object var2 = this.l.get(var1);
         String var3 = (String)this.l.get(var1 + 1);
         if (var2 instanceof Chart) {
            this.a(var3, (Chart)var2);
         } else if (var2 instanceof zox) {
            this.a((zox)var2, var3);
         }
      }

      if (this.a.size() > 0) {
         HashMap var5 = new HashMap();

         for(int var6 = 0; var6 < this.b.getCount(); ++var6) {
            var5.put(this.b.get(var6).K(), var6);
         }

         Iterator var7 = this.a.iterator();

         while(var7.hasNext()) {
            zmk var8 = (zmk)var7.next();
            Object var4;
            if (var8.a != -1) {
               var4 = var5.get(var8.a);
               if (var4 == null) {
                  var8.a = -1;
               } else {
                  var8.a = (Integer)var4;
               }
            }

            if (var8.c != -1) {
               var4 = var5.get(var8.c);
               if (var4 == null) {
                  var8.c = -1;
               } else {
                  var8.c = (Integer)var4;
               }
            }
         }
      }

   }

   void a(GroupShape var1, Shape[] var2) {
      int var3;
      for(var3 = 0; var3 < var2.length; ++var3) {
         var2[var3].N().i().b(true);
      }

      var3 = var1.a().a;
      int var4 = var1.a().c;
      int var5 = var1.a().b;
      int var6 = var1.a().d;

      for(int var7 = 0; var7 < var2.length; ++var7) {
         int[] var8 = var2[var7].G();
         var2[var7].a(0, false, (int)((double)((float)(var8[0] - var3) * 4000.0F / (float)var5) + 0.5D), (int)((double)((float)(var8[1] - var4) * 4000.0F / (float)var6) + 0.5D), (int)((double)((float)var8[2] * 4000.0F / (float)var5) + 0.5D), (int)((double)((float)var8[3] * 4000.0F / (float)var6) + 0.5D));
         var1.a(var2[var7]);
      }

   }

   Shape a(Shape var1) throws Exception {
      GroupShape var2 = (GroupShape)this.b.a(0, 4095);
      var2.N().a(var1.N().h());
      var2.a().a = (int)((double)var1.getLeftToCorner() / (double)this.b.i().L() * 72.0D * zml.i);
      var2.a().c = (int)((double)var1.getTopToCorner() / (double)this.b.i().L() * 72.0D * zml.i);
      var2.a().b = (int)((double)var1.getWidth() / (double)this.b.i().L() * 72.0D * zml.i);
      var2.a().d = (int)((double)var1.getHeight() / (double)this.b.i().L() * 72.0D * zml.i);
      ArrayList var3 = new ArrayList();
      int var4 = 0;
      this.c.j();
      zrs var5 = new zrs();
      this.c.d();
      this.c.d();

      while(this.c.r() != 4) {
         if (this.c.r() != 1) {
            this.c.a();
         } else {
            zcfq var6 = this.c.a((zcft)var5, false);
            zcfl var7 = (zcfl)var6;
            String var8 = var7.g;
            if (!"nvGrpSpPr".equals(var8) && !"grpSpPr".equals(var8)) {
               zoy var9 = this.a(var7, var4++, true);
               if (var9.P != null) {
                  com.aspose.cells.b.a.a.ze.a(var3, (Object)var9.P);
               }
            }
         }
      }

      int var12 = var3.size();
      if (var12 > 0) {
         Shape[] var13 = new Shape[var12];
         int var14 = 0;

         Object var10;
         Shape var11;
         for(Iterator var15 = var3.iterator(); var15.hasNext(); var11 = (Shape)var10) {
            var10 = var15.next();
            var13[var14++] = (Shape)var10;
         }

         this.b.a(var2, var13);
      }

      this.c();
      return var2;
   }

   private void a(zcfl var1, zoy var2) {
      String var3 = zase.a((zcfq)var1, (String)"rot");
      if (var3 != null && var3.length() > 0) {
         double var4 = zase.B(var3) / 60000.0D;
         var2.P.aa().a(var4);
      }

   }

   private void b(zcfl var1, zoy var2) throws Exception {
      zpj var3 = null;
      if (var2.P.g.k.a != null) {
         var3 = var2.P.g.k.a.b;
      }

      if (var2.P.p == null) {
         var2.P.p = new zrt(var2.P.getAutoShapeType());
      }

      zrt var4 = var2.P.p;
      zcfs var5 = var1.j();

      for(int var6 = 0; var6 < var5.a(); ++var6) {
         if (var5.a(var6) instanceof zcfl) {
            zcfl var7 = (zcfl)var5.a(var6);
            String var8 = var7.g;
            zcfw var9;
            zakp var10;
            if (!"lnRef".equals(var8)) {
               if ("fillRef".equals(var8)) {
                  var9 = this.a(var7);
                  var4.c.a = var9.a("idx");
                  if (!var9.n()) {
                     var10 = zaiq.a(var9);
                     var4.c.b = var10;
                  }
               } else if ("fontRef".equals(var8)) {
                  var9 = this.a(var7);
                  String var13 = var9.a("idx");
                  var4.b.a = var13;
                  zbtz var14 = var2.P.aa();
                  if (var13 != null && !"".equals(var13)) {
                     var14.k().a(var13);
                  }

                  if (!var9.n()) {
                     zakp var16 = zaiq.a(var9);
                     var4.b.b = var16;
                     if (!var14.k().f(16)) {
                        var14.k().b = var16;
                     }
                  }
               } else if ("effectRef".equals(var8)) {
                  var9 = this.a(var7);
                  var4.d.a = var9.a("idx");
                  if (!var9.n()) {
                     var4.d.b = zaiq.a(var9);
                  }
               }
            } else {
               var9 = this.a(var7);
               var4.a.a = var9.a("idx");
               var10 = zaiq.a(var9);
               var4.a.b = var10;
               boolean var11 = false;
               if (var3 != null && var3.e != null) {
                  zph var12 = var3.e;
                  if (var12.e != null || var12.g != null || var12.h != null || var12.f != null) {
                     var11 = true;
                  }
               }

               if (!var11) {
                  MsoLineFormat var15 = var2.P.getLineFormat();
                  if ("0".equals(var4.a.a)) {
                     var15.setVisible(false);
                  } else {
                     var15.setForeColor(Color.fromArgb(var10.c(this.k)));
                     if (var10.b(2)) {
                        var15.a((double)var10.h() / 100000.0D);
                     }
                  }
               }
            }
         }
      }

   }

   private void c(zcfl var1, zoy var2) throws Exception {
      zbtz var3 = var2.P.aa();
      zcfl var4 = zase.b((zcfq)var1, "bodyPr");
      if (var4 != null) {
         this.d(var4, var2);
      }

      zcfs var5 = var1.e("a:pPr");
      int var6 = var5.a();
      zcfg var7 = null;
      zcfg var8 = null;

      for(int var9 = 0; var9 < var6; ++var9) {
         var7 = var5.a(var9).e().a("lvl");
         var8 = var5.a(var9).e().a("indent");
         if (var7 != null && var8 == null) {
            var3.b = zase.E(var7.h);
            break;
         }
      }

      boolean var18 = true;
      zoo var10 = null;
      zcfs var11 = var1.j();

      for(int var12 = 0; var12 < var11.a(); ++var12) {
         if (var11.a(var12) instanceof zcfl) {
            zcfl var13 = (zcfl)var11.a(var12);
            String var14 = var13.g;
            if ("p".equals(var14)) {
               zqo var15 = new zqo();
               zcfw var16 = this.a(var13);
               var16.a(1);
               zoo var17 = zaio.a(var16, var15, var18, var10, this.k.getSettings().e().e());
               var15.a(var3, this.k.getWorksheets());
               if (var18) {
                  var18 = false;
               }

               var10 = var17;
            }
         }
      }

   }

   private void d(zcfl var1, zoy var2) {
      zbtz var3 = var2.P.aa();
      MsoTextFrame var4 = var2.P.getTextFrame();
      zcfh var5 = var1.e();

      for(int var6 = 0; var6 < var5.getCount(); ++var6) {
         zcfg var7 = var5.a(var6);
         if ("lIns".equals(var7.g)) {
            var4.a(zase.C(var7.h));
            var4.setAutoMargin(false);
         } else if ("tIns".equals(var7.g)) {
            var4.c(zase.C(var7.h));
            var4.setAutoMargin(false);
         } else if ("rIns".equals(var7.g)) {
            var4.b(zase.C(var7.h));
            var4.setAutoMargin(false);
         } else if ("bIns".equals(var7.g)) {
            var4.d(zase.C(var7.h));
            var4.setAutoMargin(false);
         } else if ("vertOverflow".equals(var7.g)) {
            var2.P.setTextVerticalOverflow(zase.aP(var7.h));
         } else if ("horzOverflow".equals(var7.g)) {
            var2.P.setTextHorizontalOverflow(zase.aP(var7.h));
         } else if ("anchor".equals(var7.g)) {
            var3.f(zase.I(var7.h));
         } else if ("anchorCtr".equals(var7.g)) {
            if ("1".equals(var7.h)) {
               var3.e(1);
            }
         } else if ("vert".equals(var7.g)) {
            switch(o.a(var7.h)) {
            case 0:
            case 1:
               var3.d(0);
               break;
            case 2:
               var3.d(1);
               break;
            case 3:
               var3.d(3);
               var3.e = 2;
               break;
            case 4:
               var3.d(3);
               var3.e = 1;
               break;
            default:
               var3.d(2);
            }
         } else if (!"wrap".equals(var7.g)) {
            if ("upright".equals(var7.g)) {
               var3.a(zase.C(var7.h));
            } else if ("rot".equals(var7.g)) {
               String var8 = var7.h;
               if (var8 != null && var8.length() > 0) {
                  double var9 = zase.B(var8) / 60000.0D;
                  var3.a(var9);
               }
            }
         } else {
            var3.d = var7.h == null || !"none".equals(var7.h);
         }
      }

      zcfl var11 = zase.b((zcfq)var1, "spAutoFit");
      if (var11 != null) {
         var4.a(true);
      }

      zcfl var12 = zase.b((zcfq)var1, "prstTxWarp");
      if (null != var12 && "textPlain".equals(var12.b("prst"))) {
         var3.a = true;
      }

   }

   private void a(String var1, Chart var2) throws Exception {
      zqe var3 = (zqe)this.d.get(var1);
      zcfw var4 = null;
      String var5 = null;
      if (var3.e.startsWith("/")) {
         var5 = var3.e.substring(1);
      } else {
         var5 = "xl/charts/" + com.aspose.cells.b.a.d.zk.b(var3.e);
      }

      var2.a = new zpe();
      var2.a.c = var5;
      HashMap var6 = null;
      String var7 = "xl/charts/_rels/" + com.aspose.cells.b.a.d.zk.b(var5) + ".rels";
      if (this.j.a(var7, true) != -1) {
         zcfw var8 = zasr.a(this.j, var7, true);
         var6 = zajh.a(var8, this.h.m, this.k, this.j);
         var8.c();
         Iterator var9 = var6.keySet().iterator();

         while(var9.hasNext()) {
            String var10 = (String)var9.next();
            zqe var11 = (zqe)var6.get(var10);
            switch(o.a(var11.d)) {
            case 5:
               String var12 = zase.aD(var11.e);
               var2.a.a = zaju.a(this.j, var12);
            }
         }
      }

      zaio var13 = new zaio(this.h.m, this.h, var2, var6);
      var4 = zasr.a(this.j, var5, true);
      var13.a(var4);
      var4.c();
      var4 = zasr.a(this.j, var5, true);
      var13.b(var4);
      var4.c();
      this.k.b.a(var5);
      if (var2.a.b != null) {
         this.a(var2, var5);
      }

   }

   private void a(Chart var1, String var2) throws Exception {
      String var3 = com.aspose.cells.b.a.d.zk.b(var2);
      String var4 = var2.substring(0, 0 + (var2.length() - var3.length()));
      String var5 = var4 + "_rels/" + var3 + ".rels";
      zcfw var6 = zasr.a(this.j, var5, true);
      HashMap var7 = zajh.b(var6);
      var6.c();
      String var8 = var1.a.b;
      if (var7 != null && var7.size() != 0) {
         if (!var7.containsKey(var8)) {
            throw new CellsException(6, var5 + " does not contains relId " + var8);
         } else {
            zqe var9 = (zqe)var7.get(var8);
            String var10 = zase.b(var2, var9.e);
            String var11 = com.aspose.cells.b.a.d.zk.b(var10);
            var4 = var10.substring(0, 0 + (var10.length() - var11.length()));
            String var12 = var4 + "_rels/" + com.aspose.cells.b.a.d.zk.b(var10) + ".rels";
            var1.a.d = var10;
            HashMap var13 = null;
            if (this.j.a(var12, true) != -1) {
               var6 = zasr.a(this.j, var12, true);
               var13 = zajh.a(var6, this.h.m, this.k, this.j);
               var6.c();
            }

            zaiz var14 = new zaiz(this.h, var1, var13, this.j, var10);
            var14.a();
            if (var14.f.size() > 0) {
               var1.l().a(var14.f);
            }

            this.k.b.a(var10);
         }
      } else {
         throw new CellsException(6, var5 + " does not exist or is empty");
      }
   }

   private void e(zcfl var1, zoy var2) throws Exception {
      boolean var3 = true;

      for(zcfq var4 = var1.k(); var4 != null; var4 = var4.l()) {
         if (var4.e == 1) {
            zcfl var5 = (zcfl)var4;
            String var6 = var5.g;
            if ("srcRect".equals(var6)) {
               this.f(var5, var2);
            } else if ("blip".equals(var6)) {
               this.g(var5, var2);
            } else if ("stretch".equals(var6)) {
               var3 = false;
            }
         }
      }

      if (var3) {
         var2.P.f(var3);
      }

   }

   private void f(zcfl var1, zoy var2) {
      if (var1.g()) {
         MsoFormatPicture var3 = var2.P.getFormatPicture();
         double var4 = 0.0D;
         Iterator var6 = var1.e().iterator();

         while(var6.hasNext()) {
            zcfg var7 = (zcfg)var6.next();
            String var8 = var7.h;
            switch(o.a(var7.g)) {
            case 6:
               var4 = zase.B(var8);
               var3.setLeftCrop(zbuc.b(var4));
               break;
            case 7:
               var4 = zase.B(var8);
               var3.setBottomCrop(zbuc.b(var4));
               break;
            case 8:
               var4 = zase.B(var8);
               var3.setRightCrop(zbuc.b(var4));
               break;
            case 9:
               var4 = zase.B(var8);
               var3.setTopCrop(zbuc.b(var4));
            }
         }

      }
   }

   private void g(zcfl var1, zoy var2) throws Exception {
      for(zcfq var3 = var1.k(); var3 != null; var3 = var3.l()) {
         if (var3.e == 1) {
            zcfl var4 = (zcfl)var3;
            String var5 = var4.g;
            if ("clrChange".equals(var5)) {
               this.h(var4, var2);
            } else {
               if (var2.P.getFormatPicture().b == null) {
                  var2.P.getFormatPicture().b = new ArrayList();
               }

               if ("lum".equals(var4.g)) {
                  String var6 = var4.b("bright");
                  if (var6 != null && !"".equals(var6)) {
                     var2.P.getFormatPicture().setBrightness((double)zase.C(var6) / (double)zml.k * 100.0D);
                  }

                  var6 = var4.b("contrast");
                  if (var6 != null && !"".equals(var6)) {
                     var2.P.getFormatPicture().setContrast((double)zase.C(var6) / (double)zml.k * 100.0D);
                  }
               }

               com.aspose.cells.b.a.a.ze.a(var2.P.getFormatPicture().b, (Object)zass.a(var4, true));
            }
         }
      }

   }

   private void h(zcfl var1, zoy var2) throws Exception {
      zke var3 = new zke();

      for(zcfq var4 = var1.k(); var4 != null; var4 = var4.l()) {
         if (var4.e == 1) {
            zcfl var5 = (zcfl)var4;
            String var6 = var5.g;
            zcfw var7;
            if ("clrFrom".equals(var6)) {
               var7 = this.a(var5);
               var3.a = zaiq.a(var7);
            } else if ("clrTo".equals(var6)) {
               var7 = this.a(var5);
               var3.b = zaiq.a(var7);
            }
         }
      }

      if (var3.a != null && var3.b != null) {
         var2.P.getFormatPicture().a = var3;
      }

   }

   private void i(zcfl var1, zoy var2) throws Exception {
      zph var3 = null;
      if (var2.P.g.k.a != null) {
         var3 = var2.P.g.k.a.b.e;
      }

      MsoLineFormat var4 = var2.P.getLineFormat();
      boolean var5 = false;
      Iterator var6 = var1.e().iterator();

      String var9;
      while(var6.hasNext()) {
         zcfg var7 = (zcfg)var6.next();
         var5 = true;
         String var8 = var7.g;
         var9 = var7.h;
         if ("w".equals(var8)) {
            if (var3 != null) {
               var3.a = var9;
            }

            var4.setWeight(zase.l(zase.C(var9)));
         } else if ("cmpd".equals(var8)) {
            if (var3 != null) {
               var3.c = var9;
            }

            var4.setStyle(zasd.a(var9));
         } else if ("cap".equals(var8)) {
            if (var3 != null) {
               var3.b = var9;
            }
         } else if ("algn".equals(var8) && var3 != null) {
            var3.d = var9;
         }
      }

      zcfs var12 = var1.j();

      for(int var13 = 0; var13 < var12.a(); ++var13) {
         var5 = true;
         if (var12.a(var13) instanceof zcfl) {
            zcfl var14 = (zcfl)var12.a(var13);
            var9 = var14.g;
            if ("noFill".equals(var9)) {
               if (var3 != null) {
                  var3.e = zass.a(var14, true);
               }

               var4.setVisible(false);
            } else if ("solidFill".equals(var9)) {
               if (var3 != null) {
                  var3.f = zass.a(var14, true);
               }

               zcfw var15 = this.a(var14);
               zakp var11 = zaiq.a(var15);
               var4.setForeColor(Color.fromArgb(var11.c(this.k)));
               if (var11.b(2)) {
                  var4.a((double)var11.h() / 100000.0D);
               }
            } else if ("gradFill".equals(var9)) {
               if (var3 != null) {
                  var3.g = zass.a(var14, true);
               }
            } else if ("pattFill".equals(var9)) {
               if (var3 != null) {
                  var3.h = zass.a(var14, true);
               }
            } else if ("custDash".equals(var9)) {
               if (var3 != null) {
                  var3.i = zass.a(var14, true);
               }
            } else if ("miter".equals(var9)) {
               if (var3 != null) {
                  var3.k = zass.a(var14, true);
               }
            } else if ("round".equals(var9)) {
               if (var3 != null) {
                  var3.l = zass.a(var14, true);
               }
            } else if ("bevel".equals(var9)) {
               if (var3 != null) {
                  var3.m = zass.a(var14, true);
               }
            } else if ("headEnd".equals(var9)) {
               if (var3 != null) {
                  var3.n = zass.a(var14, true);
               }

               this.a(var14, var4, true);
            } else if ("tailEnd".equals(var9)) {
               if (var3 != null) {
                  var3.o = zass.a(var14, true);
               }

               this.a(var14, var4, false);
            } else if ("prstDash".equals(var9)) {
               if (var3 != null) {
                  var3.j = zass.a(var14, true);
               }

               String var10 = zase.a((zcfq)var14, (String)"val");
               if ("dot".equals(var10)) {
                  if (var3.b != null && "rnd".equals(var3.b)) {
                     var4.setDashStyle(5);
                  } else {
                     var4.setDashStyle(7);
                  }
               } else if (var10 != null) {
                  var4.setDashStyle(zasd.b(var10));
               }
            } else if ("extLst".equals(var9) && var3 != null) {
               var3.p = zass.a(var14, true);
            }
         }
      }

      if (!var5) {
         var4.setVisible(false);
      }

   }

   private void a(zcfl var1, MsoLineFormat var2, boolean var3) {
      Iterator var4 = var1.e().iterator();

      while(var4.hasNext()) {
         zcfg var5 = (zcfg)var4.next();
         String var6 = var5.g;
         String var7 = var5.h;
         if ("len".equals(var6)) {
            if (var3) {
               var2.d(zasd.e(var7));
            } else {
               var2.g(zasd.e(var7));
            }
         } else if ("type".equals(var6)) {
            if (var3) {
               var2.b(zasd.d(var7));
            } else {
               var2.e(zasd.d(var7));
            }
         } else if ("w".equals(var6)) {
            if (var3) {
               var2.c(zasd.f(var7));
            } else {
               var2.f(zasd.f(var7));
            }
         }
      }

   }

   private void j(zcfl var1, zoy var2) throws Exception {
      if (var2.P.g.k.a == null) {
         var2.P.g.k.a = new zpi();
      }

      zpj var3 = new zpj();
      var2.P.g.k.a.b = var3;
      FillFormat var4 = var2.P.getFill();
      boolean var5 = false;
      boolean var6 = false;
      zcfs var7 = var1.j();
      var2.P.y = var1.b("bwMode");

      for(zcfq var8 = var1.k(); var8 != null; var8 = var8.l()) {
         if (var8.e == 1) {
            zcfl var9 = (zcfl)var8;
            String var10 = var9.g;
            if ("custGeom".equals(var10)) {
               this.k(var9, var2);
            } else if ("prstGeom".equals(var10)) {
               this.l(var9, var2);
            } else if ("noFill".equals(var10)) {
               var4.setType(1);
               var5 = true;
            } else if ("solidFill".equals(var10)) {
               if (!zass.a(var9)) {
                  zakp var11 = zaiq.a(this.a(var9));
                  var4.setType(2);
                  var4.getSolidFill().a = var11;
                  var5 = true;
               }
            } else if ("gradFill".equals(var10)) {
               var4.setType(3);
               GradientFill var13 = var4.getGradientFill();
               zaja var12 = new zaja(this.h, this.d);
               var12.a(this.a(var9), var13);
               var5 = true;
            } else {
               zaja var14;
               if ("pattFill".equals(var10)) {
                  var14 = new zaja(this.h, this.d);
                  var14.b(this.a(var9), var4);
                  var5 = true;
               } else if ("blipFill".equals(var10)) {
                  var14 = new zaja(this.h, this.d);
                  var14.a(this.a(var9), var4);
                  var5 = true;
               } else if ("grpFill".equals(var10)) {
                  var4.setType(6);
                  var5 = true;
               } else if ("scene3d".equals(var10)) {
                  if (var3 != null) {
                     var3.a = zass.a(var9, true);
                  }
               } else if ("effectDag".equals(var10)) {
                  if (var3 != null) {
                     var3.b = zass.a(var9, true);
                  }
               } else if ("effectLst".equals(var10)) {
                  if (var3 != null) {
                     var3.c = zass.a(var9, true);
                  }
               } else if ("sp3d".equals(var10)) {
                  if (var3 != null) {
                     var3.d = zass.a(var9, true);
                  }
               } else if ("ln".equals(var10)) {
                  if (var3 != null) {
                     var3.e = new zph();
                  }

                  this.i(var9, var2);
                  var6 = true;
               } else if ("extLst".equals(var10) && var3 != null) {
                  var3.f = zass.a(var9, true);
               }
            }
         }
      }

      if ((var2.c() == 6 || var2.c() == 2) && !var6) {
         var2.P.getLineFormat().setVisible(false);
      }

      if (!var5) {
         var4.setType(0);
         var4.c = false;
      } else {
         var4.c();
      }

      this.m = var5;
      this.n = var6;
   }

   private void k(zcfl var1, zoy var2) throws Exception {
      CustomGeometry var3 = new CustomGeometry(var2.P);
      var2.P.a((Geometry)var3);
      Iterator var4 = var1.iterator();

      while(true) {
         while(var4.hasNext()) {
            zcfq var5 = (zcfq)var4.next();
            if ("gdLst".equals(var5.g)) {
               Iterator var18 = var5.iterator();

               while(var18.hasNext()) {
                  zcfl var19 = (zcfl)var18.next();
                  String var20 = var19.b("name");
                  String var21 = var19.b("fmla");
                  var3.e().a(new ShapeGuide(var20, var21));
               }
            } else if ("avLst".equals(var5.g)) {
               this.a((zcfl)((zcfl)var5), (Geometry)var3);
            } else if ("rect".equals(var5.g)) {
               var3.a(var5.c());
            } else if ("pathLst".equals(var5.g)) {
               zcfs var6 = var5.j();
               ShapePathCollection var7 = var3.getPaths();

               for(int var8 = 0; var8 < var6.a(); ++var8) {
                  if (var6.a(var8) instanceof zcfl) {
                     zcfl var9 = (zcfl)var6.a(var8);
                     String var10 = var9.g;
                     if ("path".equals(var10)) {
                        ShapePath var11 = new ShapePath();
                        String var12 = zase.a((zcfq)var9, (String)"extrusionOk");
                        if (var12 != null && "1".equals(var12)) {
                           var11.a = true;
                        }

                        var12 = zase.a((zcfq)var9, (String)"fill");
                        if (var12 != null) {
                           var11.b = zsk.d(var12);
                        }

                        var12 = zase.a((zcfq)var9, (String)"stroke");
                        if (var12 != null && "0".equals(var12)) {
                           var11.c = false;
                        }

                        var12 = zase.a((zcfq)var9, (String)"h");
                        if (var12 != null) {
                           var11.d = com.aspose.cells.b.a.zp.a(var12, com.aspose.cells.b.a.c.za.b());
                        } else {
                           var11.d = (long)var2.H;
                        }

                        var12 = zase.a((zcfq)var9, (String)"w");
                        if (var12 != null) {
                           var11.e = com.aspose.cells.b.a.zp.a(var12, com.aspose.cells.b.a.c.za.b());
                        } else {
                           var11.e = (long)var2.G;
                        }

                        zcfs var13 = var9.j();
                        ShapePathPoint var15 = new ShapePathPoint();

                        ShapeSegmentPath var14;
                        for(int var16 = 0; var16 < var13.a(); ++var16) {
                           if (var13.a(var16) instanceof zcfl) {
                              zcfl var17 = (zcfl)var13.a(var16);
                              if ("moveTo".equals(var17.g)) {
                                 if (var17.j().a() == 1) {
                                    var14 = new ShapeSegmentPath(2);
                                    var15 = this.a((zcfl)var17.j().a(0), "x", "y");
                                    var14.getPoints().a(var15);
                                    var11.a(var14);
                                 }
                              } else if ("cubicBezTo".equals(var17.g)) {
                                 if (var17.j().a() == 3) {
                                    var14 = new ShapeSegmentPath(1);
                                    var14.getPoints().a(var15);
                                    var14.getPoints().a(this.a((zcfl)var17.j().a(0), "x", "y"));
                                    var14.getPoints().a(this.a((zcfl)var17.j().a(1), "x", "y"));
                                    var15 = this.a((zcfl)var17.j().a(2), "x", "y");
                                    var14.getPoints().a(var15);
                                    var11.a(var14);
                                 }
                              } else if ("arcTo".equals(var17.g)) {
                                 var14 = new ShapeSegmentPath(6);
                                 var14.getPoints().a(new ShapePathPoint(var2.E, var2.F));
                                 var14.getPoints().a(this.a(var17, "wR", "hR"));
                                 var14.getPoints().a(this.a(var17, "stAng", "swAng"));
                                 var11.a(var14);
                              } else if ("lnTo".equals(var17.g)) {
                                 if (var17.j().a() == 1) {
                                    var14 = new ShapeSegmentPath(0);
                                    var14.getPoints().a(var15);
                                    var15 = this.a((zcfl)var17.j().a(0), "x", "y");
                                    var14.getPoints().a(var15);
                                    var11.a(var14);
                                 }
                              } else if ("close".equals(var17.g)) {
                                 var14 = new ShapeSegmentPath(3);
                                 var11.a(var14);
                              }
                           }
                        }

                        var14 = new ShapeSegmentPath(4);
                        var11.a(var14);
                        var7.a(var11);
                     }
                  }
               }
            }
         }

         return;
      }
   }

   private ShapePathPoint a(zcfl var1, String var2, String var3) {
      String var4 = zase.a((zcfq)var1, (String)var2);
      String var5 = zase.a((zcfq)var1, (String)var3);
      int var6 = 0;
      int var7 = 0;
      if (zapb.b(var4)) {
         var6 = zase.C(var4);
         var4 = null;
      }

      if (zapb.b(var5)) {
         var7 = zase.C(var5);
         var5 = null;
      }

      if (var4 == null) {
         return var5 == null ? new ShapePathPoint(var6, var7) : new ShapePathPoint(var6, var5);
      } else {
         return var5 == null ? new ShapePathPoint(var4, var7) : new ShapePathPoint(var4, var5);
      }
   }

   private void l(zcfl var1, zoy var2) {
      String var3 = zase.a((zcfq)var1, (String)"prst");
      if (var3 != null) {
         int var4 = zase.aM(var3);
         switch(var2.P.getMsoDrawingType()) {
         default:
            var2.P.N().i().a((short)zase.aF(var4));
         }
      }

      zcfl var5 = zase.b((zcfq)var1, "avLst");
      if (var5 != null) {
         this.a(var5, var2.P.getGeometry());
      }

   }

   private void a(zcfl var1, Geometry var2) {
      if (var1 != null) {
         zcfs var3 = var1.j();

         for(int var4 = 0; var4 < var3.a(); ++var4) {
            if (var3.a(var4) instanceof zcfl) {
               zcfl var5 = (zcfl)var3.a(var4);
               if ("gd".equals(var5.g)) {
                  String var6 = var5.b("name");
                  String var7 = var5.b("fmla");
                  ShapeGuide var8 = new ShapeGuide(var6, var7);
                  var2.getShapeAdjustValues().a(var8);
               }
            }
         }
      }

   }

   private zcfw a(zcfl var1) throws Exception {
      String var2 = zass.a(var1, true);
      zcfw var3 = zasr.a(var2, false);
      var3.a(0);
      var3.d();
      return var3;
   }

   private void a(String var1) {
      if (this.d != null) {
         com.aspose.cells.b.a.a.zc var2 = com.aspose.cells.b.a.a.zf.a(this.d);

         while(var2.c()) {
            String var3 = (String)var2.a();
            if (var1.indexOf(var3) != -1 && !this.f.contains(var2.b())) {
               com.aspose.cells.b.a.a.ze.a(this.f, var2.b());
            }
         }
      }

   }

   private void b(String var1) {
      if (this.d != null) {
         Object var2 = this.d.get(var1);
         if (var2 == null) {
            return;
         }

         if (!this.f.contains(var2)) {
            com.aspose.cells.b.a.a.ze.a(this.f, var2);
         }
      }

   }

   private void a(zcfl var1, String var2) {
      if (this.d != null) {
         this.b(zase.a((zcfq)var1, (String)"dm"));
         this.b(zase.a((zcfq)var1, (String)"lo"));
         this.b(zase.a((zcfq)var1, (String)"qs"));
         this.b(zase.a((zcfq)var1, (String)"cs"));
         com.aspose.cells.b.a.a.zc var3 = com.aspose.cells.b.a.a.zf.a(this.d);

         while(var3.c()) {
            zqe var4 = (zqe)var3.b();
            if ("http://schemas.microsoft.com/office/2007/relationships/diagramDrawing".equals(var4.d) && var4.e.endsWith(var2)) {
               if (!this.f.contains(var3.b())) {
                  com.aspose.cells.b.a.a.ze.a(this.f, var3.b());
               }
               break;
            }
         }
      }

   }

   private boolean c(String var1) {
      return var1 != null && this.d != null ? this.d.containsKey(var1) : false;
   }

   ArrayList b() {
      return this.f;
   }

   private zoy a(zcfl var1, int var2, boolean var3) throws Exception {
      zoy var4 = this.b(var1, var2, var3);
      Shape var5 = var4.P;
      switch(var4.c()) {
      case 0:
         this.m(var4.g, var4);
         break;
      case 1:
         this.n(var4.g, var4);
         break;
      case 5:
         com.aspose.cells.b.a.a.ze.a(this.l, (Object)((ChartShape)var5).a());
         com.aspose.cells.b.a.a.ze.a(this.l, (Object)var4.I);
         break;
      case 6:
         this.n(var4.g, var4);
         if (var4.f.indexOf("<m:oMath") != -1) {
            var5.g.g = var4.f;
         }
         break;
      case 8:
         this.o(var4.g, var4);
         break;
      case 31:
         this.a(var4.f);
         var5.g.g = var4.f;
         break;
      default:
         if (var4.b()) {
            this.n(var4.g, var4);
         } else {
            this.a(var4.f);
            var5.g.g = var4.f;
         }
      }

      if (var4.P != null) {
         var4.P.g.k.a();
      }

      return var4;
   }

   private void m(zcfl var1, zoy var2) throws Exception {
      zpi var3 = var2.P.g.k.a;
      ArrayList var4 = new ArrayList();
      int var5 = 0;

      for(zcfq var6 = var1.k(); var6 != null; var6 = var6.l()) {
         if (var6 instanceof zcfl) {
            zcfl var7 = (zcfl)var6;
            switch(o.a(var7.g)) {
            case 10:
               this.j(var7, var2);
               break;
            case 11:
            case 12:
            case 13:
            case 14:
            case 15:
               zoy var8 = this.a(var7, var5++, true);
               if (var8.P != null) {
                  com.aspose.cells.b.a.a.ze.a(var4, (Object)var8.P);
               }
            }
         }
      }

      int var12 = var4.size();
      if (var12 > 0) {
         Shape[] var13 = new Shape[var12];
         int var14 = 0;

         Object var10;
         Shape var11;
         for(Iterator var9 = var4.iterator(); var9.hasNext(); var11 = (Shape)var10) {
            var10 = var9.next();
            var13[var14++] = (Shape)var10;
         }

         GroupShape var15 = (GroupShape)var2.P;
         this.a((GroupShape)var2.P, var13);
      }

   }

   private void n(zcfl var1, zoy var2) throws Exception {
      zpg var3 = var2.P.g.k;
      var3.a = new zpi();
      String var4 = var1.g;
      var3.a.a = "cxnSp".equals(var4);
      zpi var5 = var3.a;
      boolean var6 = false;

      for(zcfq var7 = var1.k(); var7 != null; var7 = var7.l()) {
         if (var7.e == 1) {
            zcfl var8 = (zcfl)var7;
            switch(o.a(var8.g)) {
            case 16:
               this.j(var8, var2);
               break;
            case 17:
               String var9 = zass.a(var8, true);
               var5.d = var9;
               this.c(var8, var2);
               this.a(var5.d);
               break;
            case 18:
               var5.c = zass.a(var8, true);
               this.b(var8, var2);
               var6 = true;
               break;
            case 19:
               this.a(var8, var2);
            }
         }
      }

      if (!var6) {
         var2.P.p = null;
      }

   }

   private void o(zcfl var1, zoy var2) throws Exception {
      Shape var3 = var2.P;
      zqe var4;
      if (var2.I != null) {
         var4 = (zqe)this.d.get(var2.I);
         ((Picture)var3).a(var4.a(true) + 1);
      }

      if (var2.J != null) {
         var4 = (zqe)this.d.get(var2.J);
         ((Picture)var3).a(var4.e);
      }

      for(zcfq var7 = var1.k(); var7 != null; var7 = var7.l()) {
         if (var7.e == 1) {
            zcfl var5 = (zcfl)var7;
            String var6 = var5.g;
            if ("spPr".equals(var6)) {
               this.j(var5, var2);
            } else if ("blipFill".equals(var6)) {
               this.e(var5, var2);
            }
         }
      }

   }

   private void a(zcfq var1) {
      zcfq var2 = var1.d;

      for(zcfq var3 = var1.k(); var3 != null; var3 = var3.l()) {
         if (var3.e != 1) {
            var2 = var3;
         } else {
            if ("AlternateContent".equals(var3.g)) {
               zcfq var4 = var3.k();
               zcfq var5 = var4.d;
               zcfq var6 = var5.c;
               zcfq var7 = var6;

               while(true) {
                  var7.b = var1;
                  if (var7 == var5) {
                     if (var3 == var1.d) {
                        if (var2 != var3) {
                           var2.c = var6;
                           var5.c = var3.c;
                        }

                        var1.d = var5;
                     } else {
                        var2.c = var6;
                        var5.c = var3.c;
                     }

                     var3 = var6;
                     break;
                  }

                  var7 = var7.c;
               }
            } else {
               this.a(var3);
            }

            var2 = var3;
         }
      }

   }

   private zoy b(zcfl var1, int var2, boolean var3) throws Exception {
      zoy var4 = new zoy();
      zcfs var5 = zass.a(var1, "slicer", "http://schemas.microsoft.com/office/drawing/2010/slicer");
      if (var5.a() > 0) {
         var4.f = zass.a(var1, false);
      } else {
         var4.f = zass.a(var1, true);
      }

      var4.K = var3;
      if ("AlternateContent".equals(var1.g)) {
         var4.e = true;
         zcfq var6 = var1.k();
         var1 = (zcfl)var6.k();
      }

      if (var1 != null) {
         this.a((zcfq)var1);
         if (var3) {
            var4.n = "freeFloating";
         }

         this.p(var1, var4);
      }

      this.a(var4, var2);
      return var4;
   }

   private void p(zcfl var1, zoy var2) {
      boolean var3 = false;
      switch(o.a(var1.g)) {
      case 10:
      case 16:
         var3 = true;
         break;
      case 11:
      case 12:
      case 15:
         var2.g = var1;
         var3 = true;
         break;
      case 13:
         var2.g = var1;
         var2.a(0);
         var3 = true;
         break;
      case 14:
         var2.g = var1;
         var2.a(8);
         var3 = true;
      case 17:
      case 18:
      case 19:
      default:
         break;
      case 20:
      case 21:
      case 22:
      case 23:
      case 24:
      case 25:
         var2.p = zase.a((zcfq)var1, (String)"editAs");
         var2.n = var1.g;
         var3 = true;
         break;
      case 26:
         this.b(var1, var2, true);
         return;
      case 27:
         this.b(var1, var2, false);
         return;
      case 28:
         this.v(var1, var2);
         return;
      case 29:
         if (var2.E == 0) {
            this.u(var1, var2);
         }

         return;
      case 30:
      case 31:
      case 32:
      case 33:
      case 34:
         this.q(var1, var2);
         return;
      case 35:
         if (var2.c() == 8) {
            this.s(var1, var2);
         }

         return;
      case 36:
         this.a(var1, var2, var2.K);
         return;
      case 37:
         this.t(var1, var2);
         return;
      case 38:
         String var4 = zase.a((zcfq)var1, (String)"prst");
         if (var4 != null) {
            var2.N = zase.aM(var4);
         }

         return;
      case 39:
         var2.O = 0;
         return;
      case 40:
         var2.k = var1;
         return;
      }

      if (var3) {
         for(zcfq var5 = var1.k(); var5 != null; var5 = var5.l()) {
            this.p((zcfl)var5, var2);
            if ("grpSpPr".equals(var5.g)) {
               break;
            }
         }
      }

   }

   private void q(zcfl var1, zoy var2) {
      for(zcfq var3 = var1.k(); var3 != null; var3 = var3.l()) {
         if (var3.e == 1) {
            switch(o.a(var3.g)) {
            case 41:
               var2.h = (zcfl)var3;
               break;
            case 42:
               var2.i = (zcfl)var3;
               String var4 = var2.i.a("txBox", (String)null);
               if (zase.b(var4, false)) {
                  var2.a(6);
               }
               break;
            case 43:
            case 44:
            case 45:
            case 46:
               var2.i = (zcfl)var3;
            }
         }
      }

      zcfs var5;
      zcfl var6;
      if (var2.h != null) {
         var2.b = var2.h.a("id", (String)null);
         var5 = var2.h.e("a:ext");
         if (var5 != null && var5.a() > 0) {
            var6 = (zcfl)var5.a(0);
            this.r(var6, var2);
         }
      }

      if (var2.c == null && var2.i != null) {
         var5 = var2.i.e("a:ext");
         if (var5 != null && var5.a() > 0) {
            var6 = (zcfl)var5.a(0);
            this.r(var6, var2);
         }
      }

   }

   private void r(zcfl var1, zoy var2) {
      for(zcfq var3 = var1.k(); var3 != null; var3 = var3.l()) {
         zcfl var4 = (zcfl)var3;
         switch(o.a(var4.g)) {
         case 47:
         case 48:
            if (var4.g()) {
               Iterator var5 = var4.e().iterator();

               while(var5.hasNext()) {
                  zcfg var6 = (zcfg)var5.next();
                  switch(o.a(var6.g)) {
                  case 49:
                     var2.d = var6.h;
                     break;
                  case 50:
                     var2.c = var6.h;
                  }
               }
            }
         }
      }

   }

   private void s(zcfl var1, zoy var2) {
      zcfl var3 = zase.b((zcfq)var1, "blip");
      if (var3 != null) {
         Iterator var4 = var3.e().iterator();

         while(var4.hasNext()) {
            zcfg var5 = (zcfg)var4.next();
            switch(o.a(var5.g)) {
            case 51:
               var2.I = var5.h;
               break;
            case 52:
               var2.J = var5.h;
            }
         }
      }

   }

   private void t(zcfl var1, zoy var2) {
      String var3 = var1.a("uri", (String)null);

      for(zcfq var4 = var1.k(); var4 != null; var4 = var4.l()) {
         if ("graphicData".equals(var4.g)) {
            for(zcfq var5 = var4.k(); var5 != null; var5 = var5.l()) {
               if (var5 instanceof zcfl) {
                  zcfl var6 = (zcfl)var5;
                  switch(o.a(var6.g)) {
                  case 53:
                     var2.I = zase.a((zcfq)var6, (String)"id");
                     if (this.c(var2.I)) {
                        var2.a(5);
                     }
                     break;
                  case 54:
                  case 55:
                     var2.a(31);
                     var2.j = var6;
                     break;
                  case 56:
                     var2.L = true;
                     var2.j = var6;
                  }
               }
            }

            return;
         }
      }

   }

   private void a(zcfl var1, zoy var2, boolean var3) {
      var2.l = var1;

      for(zcfq var4 = var1.k(); var4 != null; var4 = var4.l()) {
         if (var4.e == 1) {
            switch(o.a(var4.g)) {
            case 28:
               if (var3) {
                  this.b((zcfl)var4, false, var2);
               }
               break;
            case 57:
               if (var3) {
                  this.b((zcfl)var4, true, var2);
               }
               break;
            case 58:
               this.a((zcfl)var4, true, var2);
               break;
            case 59:
               this.a((zcfl)var4, false, var2);
            }
         }
      }

   }

   private void a(zcfl var1, boolean var2, zoy var3) {
      int[] var4 = this.b(var1);
      if (var4 != null) {
         if (var2) {
            var3.a().a = var4[0];
         } else {
            var3.a().b = var4[0];
         }

         if (var2) {
            var3.a().c = var4[1];
         } else {
            var3.a().d = var4[1];
         }
      }

   }

   private void b(zcfl var1, boolean var2, zoy var3) {
      int[] var4 = this.b(var1);
      if (var4 != null) {
         if (var2) {
            var3.E = var4[0];
         } else {
            var3.G = var4[0];
         }

         if (var2) {
            var3.F = var4[1];
         } else {
            var3.H = var4[1];
         }
      }

   }

   private void u(zcfl var1, zoy var2) {
      int[] var3 = this.b(var1);
      if (var3 != null) {
         if (var3[0] >= 0) {
            var2.E = zase.a(var3[0], this.g);
         }

         if (var3[1] >= 0) {
            var2.F = zase.a(var3[1], this.g);
         }

      }
   }

   private void v(zcfl var1, zoy var2) {
      int[] var3 = this.b(var1);
      if (var3 != null) {
         if (var3[0] >= 0) {
            var2.C = zase.a(var3[0], this.g);
         }

         if (var3[1] >= 0) {
            var2.D = zase.a(var3[1], this.g);
         }

      }
   }

   private int[] b(zcfl var1) {
      if (!var1.g()) {
         return null;
      } else {
         int[] var2 = new int[]{-1, -1};
         Iterator var3 = var1.e().iterator();

         while(var3.hasNext()) {
            zcfg var4 = (zcfg)var3.next();
            double var5 = zase.B(var4.h);
            int var7 = -1;
            if (var5 < 2.147483647E9D) {
               var7 = (int)var5;
            }

            char var8 = var4.g.charAt(var4.g.length() - 1);
            if (var8 == 'x') {
               var2[0] = var7;
            } else if (var8 == 'y') {
               var2[1] = var7;
            }
         }

         return var2;
      }
   }

   private void b(zcfl var1, zoy var2, boolean var3) {
      for(zcfq var4 = var1.k(); var4 != null; var4 = var4.l()) {
         if (var4.e == 1) {
            zcfl var5 = (zcfl)var4;
            String var6 = var5.g;
            String var7 = zass.a((zcfq)var5);

            try {
               int var8;
               if ("col".equals(var6)) {
                  var8 = zase.C(var7);
                  if (var3) {
                     var2.q = var8;
                  } else {
                     var2.u = var8;
                  }
               } else {
                  double var11;
                  if ("colOff".equals(var6)) {
                     var11 = zase.b(zase.C(var7), this.g);
                     if (var3) {
                        var2.r = var11;
                     } else {
                        var2.v = var11;
                     }
                  } else if ("row".equals(var6)) {
                     var8 = zase.C(var7);
                     if (var3) {
                        var2.s = var8;
                     } else {
                        var2.w = var8;
                     }
                  } else if ("rowOff".equals(var6)) {
                     var11 = zase.b(zase.C(var7), this.g);
                     if (var3) {
                        var2.t = var11;
                     } else {
                        var2.x = var11;
                     }
                  } else if ("x".equals(var6)) {
                     var11 = zase.B(var7);
                     if (var3) {
                        var2.y = var11;
                     } else {
                        var2.A = var11;
                     }
                  } else if ("y".equals(var6)) {
                     var11 = zase.B(var7);
                     if (var3) {
                        var2.z = var11;
                     } else {
                        var2.B = var11;
                     }
                  }
               }
            } catch (Exception var10) {
               ;
            }
         }
      }

   }

   private void a(zoy var1, int var2) {
      Object var3 = null;
      String var4;
      if (var1.c != null) {
         var1.a = this.b.getCount();
         if (var1.d != null) {
            var3 = this.b.a(var1.c(), var1.d());
            ((Shape)var3).f(var1.d);
            com.aspose.cells.b.a.a.ze.a(this.h.n, (Object)var1);
         } else {
            var4 = "\u0000s" + var1.b;
            zow var5 = (zow)this.h.p.get(var4);
            if (var5 != null && var5.e) {
               if (var5 instanceof zox) {
                  var3 = this.b.a(24, 4095);
                  ((zox)var5).m = (OleObject)var3;
                  com.aspose.cells.b.a.a.ze.a(this.l, (Object)var5);
                  com.aspose.cells.b.a.a.ze.a(this.l, (Object)var5.d);
               }

               var1.o = var5;
               com.aspose.cells.b.a.a.ze.a(this.h.n, (Object)var1);
            }

            if (var3 == null) {
               var3 = this.b.a(29, 4095);
            }

            var1.P = (Shape)var3;
         }
      } else if (var1.L) {
         var3 = this.b.a(29, 4095);
         var1.P = (Shape)var3;
         zcfl var9 = var1.j;
         String var10 = zase.a((zcfq)var9, (String)"dm");
         zqe var6 = (zqe)this.d.get(var10);
         String var7 = com.aspose.cells.b.a.zv.a(com.aspose.cells.a.c.zt.b(var6.e), "data", "drawing");
         String var8 = zase.aD(com.aspose.cells.a.c.zt.d(var6.e) + "/" + var7);
         var1.P.o = var8;
         this.a(var9, var7);
      } else if (var1.c() == 31) {
         var4 = var1.j.a("name", (String)null);
         if (this.h.o.get(var4) != null) {
            var3 = (Shape)this.h.o.get(var4);
         } else {
            var3 = new zbnb(this.b, (zbmt)null);
         }

         this.b.c((Shape)var3);
      } else if (var1.c() == 5) {
         var4 = null;
         Worksheet var12 = this.h.d;
         Chart var11;
         if (this.e) {
            var11 = new Chart(var12, this.i.getShapes());
            this.i.getShapes().c(var11.getChartObject());
         } else {
            if (var12.getType() == 2) {
               var11 = var12.getCharts().get(0);
            } else {
               var11 = new Chart(var12);
               var12.getCharts().a(var11);
            }

            var12.getShapes().c(var11.getChartObject());
         }

         var3 = var11.getChartObject();
      } else {
         var3 = this.b.a(var1.c(), var1.d());
         if (var1.c() == 0) {
            ((GroupShape)var3).a(var1.a());
         }
      }

      var1.P = (Shape)var3;
      var1.e();
      ((Shape)var3).g = new zpq(true);
      ((Shape)var3).g.f = var1.n;
      ((Shape)var3).g.n = var1.e;
      ((Shape)var3).g.e = var2;
      if (var1.c() == 6) {
         ((TextBox)var3).aa().a(true);
      }

      zcfg var13;
      Iterator var15;
      if (var1.l != null && var1.l.g()) {
         var15 = var1.l.e().iterator();

         while(var15.hasNext()) {
            var13 = (zcfg)var15.next();
            switch(o.a(var13.g)) {
            case 60:
               ((Shape)var3).N().i().e(zase.ax(var13.h));
               break;
            case 61:
               ((Shape)var3).N().i().f(zase.ax(var13.h));
               break;
            case 62:
               double var14 = zbuc.b((int)zase.B(var13.h));
               var1.P.a(var14);
            }
         }
      }

      if (var1.g != null && var1.g.g()) {
         var15 = var1.g.e().iterator();

         while(var15.hasNext()) {
            var13 = (zcfg)var15.next();
            switch(o.a(var13.g)) {
            case 63:
               ((Shape)var3).g(zase.ax(var13.h));
               break;
            case 64:
               ((Shape)var3).d(var13.h);
               break;
            case 65:
               ((Shape)var3).setLinkedCell(var13.h);
               break;
            case 66:
               ((Shape)var3).aa().a(zase.ax(var13.h));
            }
         }
      }

      this.a((zcfl)var1.h, (Shape)var3);
      this.b(var1.h, (Shape)var3);
      this.e(var1.k, (Shape)var3);
   }

   private void a(zcfl var1, Shape var2) {
      if (var1 != null) {
         boolean var3 = false;
         Iterator var4 = var1.e().iterator();

         while(var4.hasNext()) {
            zcfg var5 = (zcfg)var4.next();
            switch(o.a(var5.g)) {
            case 67:
               var2.m = zase.C(var5.h);
               if (var2.m > this.b.e()) {
                  this.b.b(var2.m);
               }
               break;
            case 68:
               var2.setAlternativeText(var5.h);
               break;
            case 69:
               var2.setName(var5.h);
               break;
            case 70:
               var2.setTitle(var5.h);
               break;
            case 71:
               var3 = zase.ax(var5.h);
               if (var3) {
                  var2.setHidden(var3);
               }
            }
         }

         for(zcfq var6 = var1.k(); var6 != null; var6 = var6.l()) {
            if (var6.e == 1) {
               zcfl var7 = (zcfl)var6;
               switch(o.a(var6.g)) {
               case 72:
                  this.f(var7, var2);
               case 73:
               }
            }
         }

      }
   }

   private void b(zcfl var1, Shape var2) {
      if (var1 != null) {
         for(zcfq var3 = var1.k(); var3 != null; var3 = var3.l()) {
            if (var3.e == 1) {
               zcfl var4 = (zcfl)var3;
               switch(o.a(var3.g)) {
               case 74:
               case 75:
               case 76:
               case 77:
               case 78:
                  this.c(var4, var2);
                  break;
               case 79:
               case 80:
                  this.d(var4, var2);
               case 81:
               }
            }
         }

      }
   }

   private void c(zcfl var1, Shape var2) {
      if (var1.g()) {
         Iterator var3 = var1.e().iterator();

         while(var3.hasNext()) {
            zcfg var4 = (zcfg)var3.next();
            boolean var5 = false;
            if (var4.h != null) {
               var5 = zase.ax(var4.h);
            }

            switch(o.a(var4.g)) {
            case 82:
               var2.setLockedProperty(1, var5);
               break;
            case 83:
               var2.setLockedProperty(12, var5);
               break;
            case 84:
               var2.setLockedProperty(7, var5);
               break;
            case 85:
               var2.setLockedProperty(11, var5);
               break;
            case 86:
               var2.setLockedProperty(3, var5);
               break;
            case 87:
               var2.setLockedProperty(0, var5);
               break;
            case 88:
               var2.setLockedProperty(6, var5);
               break;
            case 89:
               var2.setLockedProperty(10, var5);
               break;
            case 90:
               var2.setLockedProperty(8, var5);
               break;
            case 91:
               var2.setLockedProperty(5, var5);
               break;
            case 92:
               var2.setLockedProperty(2, var5);
               break;
            case 93:
               var2.setLockedProperty(4, var5);
            }
         }

      }
   }

   private void d(zcfl var1, Shape var2) {
      int var3 = 0;
      int var4 = 0;
      Iterator var5 = var1.e().iterator();

      while(var5.hasNext()) {
         zcfg var6 = (zcfg)var5.next();
         switch(o.a(var6.g)) {
         case 67:
            var3 = zase.C(var6.h);
            break;
         case 94:
            var4 = zase.C(var6.h);
         }
      }

      zmk var7 = var2.f;
      if (var7 == null) {
         var7 = var2.f = new zmk();
         com.aspose.cells.b.a.a.ze.a(this.a, (Object)var7);
      }

      if ("stCxn".equals(var1.g)) {
         var7.a = var3;
         var7.b = var4;
      } else {
         var7.c = var3;
         var7.d = var4;
      }

   }

   private void e(zcfl var1, Shape var2) {
      if (var1 != null) {
         Iterator var3 = var1.e().iterator();

         while(var3.hasNext()) {
            zcfg var4 = (zcfg)var3.next();
            switch(o.a(var4.g)) {
            case 95:
               var2.setPrintable(zase.ax(var4.h));
               break;
            case 96:
               var2.setLocked(zase.ax(var4.h));
            }
         }

      }
   }

   private void f(zcfl var1, Shape var2) {
      String var3 = null;
      String var4 = null;
      Iterator var5 = var1.e().iterator();

      while(var5.hasNext()) {
         zcfg var6 = (zcfg)var5.next();
         switch(o.a(var6.g)) {
         case 67:
            var3 = var6.h;
            break;
         case 97:
            var4 = var6.h;
         }
      }

      if (var3 != null && !"".equals(var3)) {
         Object var9 = this.d.get(var3);
         if (var9 == null) {
            return;
         }

         zqe var10 = (zqe)var9;
         String var7 = var10.e;
         if (var7.charAt(0) == '#') {
            var7 = var7.substring(1);
         }

         if (var7 != null && var7.startsWith("file:///")) {
            var7 = var7.substring("file:///".length());
         }

         Hyperlink var8 = var2.addHyperlink(var7);
         if (var4 != null) {
            var8.setScreenTip(var4);
         }
      }

   }
}
